﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IronCow.UnitTests.Mock
{
    class MockContactResponsePart : MockResponsePart
    {
		private string mContactId;
        private string mFullName;
        private string mUserName;

        public MockContactResponsePart(int contactId, string fullName, string userName)
        {
            mContactId = contactId.ToString();
            mFullName = fullName;
            mUserName = userName;
        }

        public override void GetResponseMarkup(System.Xml.XmlWriter markupWriter, Dictionary<string, string> parameters)
        {
            markupWriter.WriteStartElement("contact");
            markupWriter.WriteAttributeString("id", mContactId);
            markupWriter.WriteAttributeString("fullname", mFullName);
            markupWriter.WriteAttributeString("username", mUserName);
            markupWriter.WriteEndElement();
        }
    }
}
